package com.toprs.business.extend

import org.mybatis.dynamic.sql.BasicColumn
import org.mybatis.dynamic.sql.render.TableAliasCalculator
import java.util.*

class MyConstantLong(private val s: Long) : BasicColumn {

    private var alias: String? = null

    override fun alias(): Optional<String> {
        return Optional.ofNullable(alias)
    }

    override fun `as`(alias: String?): MyConstantLong {
        val myConstant = MyConstantLong(0)
        myConstant.alias = alias
        return myConstant
    }

    override fun renderWithTableAlias(tableAliasCalculator: TableAliasCalculator?): String {
        return "$s"
    }


}